package com.ronri.ams.sample;

import android.os.Bundle;

import com.cz.nongyetongv5.application.InitApplication;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2017/5/21.
 */

public class activity_select_humen extends activity_control_single_select {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        String szRemoteAddress = InitApplication.SystemConfig.getBase().RemoteAddress(
                InitApplication.SystemConfig.getModule().getHumen().getAddress());

        setParamets(szRemoteAddress, "name", "name");

        super.onCreate(savedInstanceState);
    }

    @Override
    public String MergeRemoteParamerts(int nPageIndex, int nPageSize, Map<String, Object> Paramerts) {
        Map<String, Object> oReturn = new HashMap<>();

        oReturn.put("region_code", InitApplication.LoginInfo.getData().getRegion_code());
        if(Paramerts != null) {
            if (Paramerts.containsKey("name"))
                oReturn.put("search", Paramerts.get("name"));
        }

        return super.MergeRemoteParamerts(nPageIndex, nPageSize, oReturn);
    }
}
